package sk.ogame.realm.utils;

/**
 * @author 支绍昆
 * 2023/2/27
 * 舰队构建器
 **/
public class FleetsBuilder {

    //<sheepId,number>
    //private Map<Integer,Integer> map = new HashMap<>();

    private StringBuilder sb = new StringBuilder();

    public FleetsBuilder set(int sheepId, int num) {
        sb.append(sheepId).append(":").append(num).append("|");
        return this;
    }

    public String toString() {
        if (sb.length() == 0) {
            return "";
        }
        sb.deleteCharAt(sb.length() - 1);
        return sb.toString();
    }

}
